{template "header.html"}


<form action="" class="form-horizontal" method="post" name="myform" id="myform">
    {$form}
    <div class="portlet bordered light myfbody">
        <div class="portlet-title tabbable-line">
            <ul class="nav nav-tabs" style="float:left;">
                <li class="{if $page==0}active{/if}">
                    <a href="#tab_0" data-toggle="tab" onclick="$('#dr_page').val('0')"> <i class="fa fa-home"></i> {dr_lang('主页SEO设置')} </a>
                </li>
                <li class="{if $page==1}active{/if}">
                    <a href="#tab_1" data-toggle="tab" onclick="$('#dr_page').val('1')"> <i class="fa fa-search"></i> {dr_lang('搜索SEO设置')} </a>
                </li>
            </ul>
        </div>
        <div class="portlet-body">
            <div class="tab-content">


            <div class="tab-pane {if 1 == $page}active{/if}" id="tab_1">
                <div class="form-body">
                    <div class="form-group dr_search">
                        <label class="col-md-2 control-label">{dr_lang('关键词匹配字段')}</label>
                        <div class="col-md-9">
                            <div class="mt-checkbox-inline">
                                {loop $kwfield $f}
                                <label class="mt-checkbox mt-checkbox-outline"><input type="checkbox" name="data[search][kw][]" value="{$f.fieldname}" {if @in_array($f.fieldname, (array)$data['search']['kw'])} checked{/if} /> {$f.name} <span></span></label>
                                {/loop}
                            </div>
                            <span class="help-block">{dr_lang('搜索关键词匹配字段只能设置主表字段，勾选字段越多查询速度就越慢')}</span>
                        </div>
                    </div>

                    <div class="form-group dr_search">
                        <label class="col-md-2 control-label">{dr_lang('最大搜索量')}</label>
                        <div class="col-md-9">
                            <label><input class="form-control" type="text" name="data[search][total]" value="{if isset($data['search']['total'])}{$data['search']['total']}{else}500{/if}" ></label>
                            <span class="help-block">{dr_lang('指搜索时最大显示的数据量，填写0表示全部显示（不建议填写0，一般用户只会看前几页）')}</span>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-md-2 control-label">自定义URL（无参数时）</label>
                        <div class="col-md-9">
                            <input class="form-control input-xlarge" type="text" name="data[search][urlrule]" value="{$data['search']['urlrule']}" >
                            <span class="help-block">{dr_lang('解析地址：index.php?s=huiyuan&c=home')}</span>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-md-2 control-label">自定义URL（带参数时）</label>
                        <div class="col-md-9">
                            <input class="form-control input-xlarge" type="text" name="data[search][urlrule_page]" value="{$data['search']['urlrule_page']}" >
                            <span class="help-block">{dr_lang('通配符：{param}，解析地址：index.php?s=huiyuan&c=home&rewirte={param}')}</span>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-md-2 control-label">{dr_lang('Title')}</label>
                        <div class="col-md-7">
                            <textarea name="data[search][title]" class="form-control myvalue" style="width: 100%; height: 60px">{$data.search.title}</textarea>
                            <p style="margin-top: 10px;">
                                <label>{$search_seo}</label>

                            </p>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-2 control-label">{dr_lang('Keywords')}</label>
                        <div class="col-md-7">
                            <textarea name="data[search][keywords]" class="form-control myvalue" style="width: 100%; height: 60px">{$data.search.keywords}</textarea>

                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-md-2 control-label">{dr_lang('Description')}</label>
                        <div class="col-md-7">
                            <textarea name="data[search][description]" class="form-control myvalue" style="width: 100%; height: 60px">{$data.search.description}</textarea>

                        </div>
                    </div>


                </div>
            </div>

            <div class="tab-pane {if 0 == $page}active{/if}" id="tab_0">
                <div class="form-body">
					<div class="form-group">
					    <label class="col-md-2 control-label">会员SEO开关</label>
					    <div class="col-md-9">
							<div class="mt-radio-inline">
							    <label class="mt-radio mt-checkbox-outline"><input type="radio" name="data[home][seo]" value="0" {if $data['home']['seo']==0}checked{/if} /> {dr_lang('开启')} <span></span></label>
							    <label class="mt-radio mt-checkbox-outline"><input type="radio" name="data[home][seo]" value="1" {if $data['home']['seo'] ==1}checked{/if} /> {dr_lang('关闭')} <span></span></label>
							</div>
					        
					        <span class="help-block">{dr_lang('开关')}</span>
					    </div>
					</div>
                    <div class="form-group">
                        <label class="col-md-2 control-label">自定义URL</label>
                        <div class="col-md-9">
                            <input class="form-control input-xlarge" type="text" name="data[home][urlrule]" value="{$data['home']['urlrule']}" >
                            <span class="help-block">{dr_lang('解析地址：index.php?s=huiyuan&c=show&uid={id}、index.php?s=huiyuan&c=show&name={username}')}</span>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-md-2 control-label">{dr_lang('Title')}</label>
                        <div class="col-md-7">
                            <textarea name="data[home][title]" class="form-control myvalue" style="width: 100%; height: 60px">{$data.home.title}</textarea>
                            <p style="margin-top: 10px;">
                                <label>{$field}</label>
                            </p>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-2 control-label">{dr_lang('Keywords')}</label>
                        <div class="col-md-7">
                            <textarea name="data[home][keywords]" class="form-control myvalue" style="width: 100%; height: 60px">{$data.home.keywords}</textarea>
                            <p style="margin-top: 10px;">
                                <label>{$field}</label>
                            </p>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-md-2 control-label">{dr_lang('Description')}</label>
                        <div class="col-md-7">
                            <textarea name="data[home][description]" class="form-control myvalue" style="width: 100%; height: 60px">{$data.home.description}</textarea>
                            <p style="margin-top: 10px;">
                                <label>{$field}</label>
                            </p>
                        </div>
                    </div>
                </div>
            </div>


        </div>
        </div>
    </div>

    </div>

    <div class="portlet-body form myfooter">
        <div class="form-actions text-center">
            <button type="button" onclick="dr_ajax_submit('{dr_now_url()}&page='+$('#dr_page').val(), 'myform', '2000')" class="btn green"> <i class="fa fa-save"></i> {dr_lang('保存')}</button>
        </div>
    </div>
</form>



{template "footer.html"}